Repository navigation
Added a check for the characters of ERI usernames, tokens, and passwords - #1228
Merged
SommerEngineering merged 8 commits intoNov 24, 2026
Merged
SommerEngineering merged 8 commits into
SommerEngineering merged 8 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ERI v1 sends the username, the password, and the access token of a data source in HTTP headers, which carry nothing but ASCII. Until now, an umlaut in a password or an invisible character in a token failed only while signing in, with messages such as "Request headers must contain only ASCII characters.", which users cannot act on. No input checked more than whether a value was empty. #1227 introduced the central check for API keys and left ERI to this pull request, since tokens and passwords need texts of their own, and a password may contain spaces.
What changes:
APIKeyValidation.Checkgets an overload which allows plain spaces inside a value. The newERICredentialValidationinTools/Validation/checks an access token exactly like an API key, and a password or a username with spaces allowed inside. Spaces and line breaks around a value go, since HTTP drops them anyway. A message about a password never names the character, since the field hides the password. Messages about stored values name no character at all, since the callers of the ERI client write them to the log.Authorizationheader, which .NET does not parse, so that no message of the client repeats a value of the request. A guard test keeps the ERI client from parsing anAuthorizationheader again.Related proposal or issue
None. Follow-up to #1227, found while reviewing #1224.
How did you test it?
dotnet run -- verify: 7,392 .NET tests, the trim smoke test, 379 Rust tests, Clippy, and the model sources.Authorizationheader.Wiki
Users, page "Troubleshooting" (German: "Fehlerbehebung"), section "Data sources": a new entry for the messages about a username, access token, or password with a character "which the ERI server cannot receive" or "which an access token cannot contain". Enter the value again under "Settings" → "Configure Data Sources" → "Edit". Spaces inside a password or username are fine, and AI Studio removes spaces and line breaks around it. An umlaut or a typographic quotation mark cannot reach the ERI server; then the IT department helps. Requires AI Studio v26.11.2 or newer.
IT departments, page "Confidence and Data Security", section "Rolling out data sources on ERI servers": usernames, tokens, and passwords travel in HTTP headers and may contain ASCII only. Spaces inside a username or password are fine, and AI Studio removes spaces and line breaks around them. A data source with any other character is left out, and the log names the kind of character, but not the value. Requires AI Studio v26.11.2 or newer.
Both are prepared for the release.
Required statements
Credits (optional)